"""
钻石问题 菱形问题 多继承位置参数传递
    类的多继承
author: Mr_52Hz
date: 2019-10-23
"""


class A(object):

    def __init__(self, a, aa, *args):
        print('A init begin')
        self.a = a
        self.aa = aa
        print('A init end')


class B(A):

    def __init__(self, b, bb, bbb, *args):
        print('B init begin')
        super().__init__(b, bb, *args)
        self.bbb = bbb
        print('B init end')


class C(A):

    def __init__(self, c, cc, ccc, *args):
        print('C init begin')
        super().__init__(c, cc, *args)
        self.ccc = ccc
        print('C init end')


class C2(A):

    def __init__(self, c, cc, ccc, *args):
        print('C2 init begin')
        super().__init__(c, cc, *args)
        self.ccc2 = ccc
        print('C2 init end')


class D(B, C, C2):

    def __init__(self, b, bb, bbb, ccc, ccc2, ddd, *args):
        print('D init begin')
        super().__init__(b, bb, bbb, ccc, ccc2)
        self.ddd = ddd
        print('D init end')


b = B('1', '2', '3')
c = C('1', '2', '3')


d = D('1', '2', '3', '3', '3', '3')

